package web_wms_model

import (
	"github.com/shopspring/decimal"
	"time"
)

const TableNameWmProductInfo = "wm_product_info"

// WmProductInfo mapped from table <wm_product_info>
type WmProductInfo struct {
	ID                      string          `gorm:"column:id;type:nvarchar;primaryKey" json:"id"`
	ProductCode             string          `gorm:"column:product_code;type:nvarchar;not null" json:"product_code"`
	OwnerID                 string          `gorm:"column:owner_id;type:nvarchar" json:"owner_id"`
	OwnerCode               string          `gorm:"column:owner_code;type:nvarchar;not null" json:"owner_code"`
	ExpressionCn            string          `gorm:"column:expression_cn;type:nvarchar" json:"expression_cn"`
	ExpressionEn            string          `gorm:"column:expression_en;type:nvarchar" json:"expression_en"`
	Length                  decimal.Decimal `gorm:"column:length;type:decimal" json:"length"`
	Width                   decimal.Decimal `gorm:"column:width;type:decimal" json:"width"`
	Height                  decimal.Decimal `gorm:"column:height;type:decimal" json:"height"`
	Volume                  decimal.Decimal `gorm:"column:volume;type:decimal" json:"volume"`
	Specifications          string          `gorm:"column:specifications;type:nvarchar" json:"specifications"`
	ShortCode               string          `gorm:"column:short_code;type:nvarchar" json:"short_code"`
	BarCode                 string          `gorm:"column:bar_code;type:nvarchar" json:"bar_code"`
	Manufacturer            string          `gorm:"column:manufacturer;type:nvarchar" json:"manufacturer"`
	Origin                  string          `gorm:"column:origin;type:nvarchar" json:"origin"`
	PiecePackage            int64           `gorm:"column:piece_package;type:int" json:"piece_package"`
	PackageUnit             string          `gorm:"column:package_unit;type:nvarchar" json:"package_unit"`
	ProductType             string          `gorm:"column:product_type;type:nvarchar" json:"product_type"`
	MedicalType             string          `gorm:"column:medical_type;type:nvarchar" json:"medical_type"`
	ApprovalNum             string          `gorm:"column:approval_num;type:nvarchar" json:"approval_num"`
	MedicineSpecicalControl string          `gorm:"column:medicine_specical_control;type:char" json:"medicine_specical_control"`
	StorageCondition        string          `gorm:"column:storage_condition;type:nvarchar" json:"storage_condition"`
	StoragePrecaution       string          `gorm:"column:storage_precaution;type:nvarchar" json:"storage_precaution"`
	ActiveFlag              string          `gorm:"column:active_flag;type:char;default:1" json:"active_flag"`
	CreateTime              time.Time       `gorm:"column:create_time;type:datetime" json:"create_time"`
	UpdateTime              time.Time       `gorm:"column:update_time;type:datetime" json:"update_time"`
	PermitHolder            string          `gorm:"column:permit_holder;type:nvarchar" json:"permit_holder"`
	RegisterTime            time.Time       `gorm:"column:register_time;type:date" json:"register_time"`
	ContainDoping           string          `gorm:"column:contain_doping;type:char" json:"contain_doping"`
	Imported                string          `gorm:"column:imported;type:char" json:"imported"`
	MediumPackage           int64           `gorm:"column:medium_package;type:int" json:"medium_package"`
	MediumPackageSeparate   string          `gorm:"column:medium_package_separate;type:char" json:"medium_package_separate"`
	StorageType             string          `gorm:"column:storage_type;type:nvarchar" json:"storage_type"`
	TraceFlag               string          `gorm:"column:trace_flag;type:char" json:"trace_flag"`
}

// TableName WmProductInfo's table name
func (*WmProductInfo) TableName() string {
	return TableNameWmProductInfo
}
